package main

import (
	"net/http"

	"gitee.com/lv-forever/open-ai-api/api"
	"gitee.com/lv-forever/open-ai-api/config"

	"github.com/gin-gonic/gin"
)

var reqBody struct {
	msg string
}

func main() {
	router := gin.Default()

	// Add routes
	router.POST("/ask", api.ASK)

	// Add a health endpoint
	router.GET("/health", func(c *gin.Context) {
		c.String(http.StatusOK, "OK")
	})

	// config run config
	configs := config.LoadConfig()
	port := ":" + configs.HttpPort

	gin.SetMode(configs.GinMode)
	router.Run(port)
}
